package com.jl.core.controller;

import com.jl.config.BaseResponse;
import com.jl.core.model.resp.ReConnectResp;
import com.jl.core.service.GameService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("game")
@Slf4j
@Api(description = "游戏")
public class GameController {

    @Autowired
    private GameService gameService;

    @GetMapping("reConnect")
    @ApiOperation(value = "断线重连")
    public BaseResponse<ReConnectResp> reConnect(){
        ReConnectResp reConnectResp = gameService.reConnect();
        return BaseResponse.success(reConnectResp);
    }
}
